/**
 * Copyright (c) 时间, Tal.Ben 袁东昊 (ydonghao2@gmail.com).
 *
 * 版权
 */
package com.talben.soudian.ui;

import android.content.Intent;
import android.view.View;
import android.widget.TextView;
import butterknife.InjectView;

import com.talben.soudian.R;
import com.talben.soudian.base.BaseActivity;
import com.talben.soudian.bean.User;
import com.talben.soudian.fragment.viewpagerfragment.MyInformationFragment;

/**
 * @Title: GiftLogActivity.java
 * @Package com.talben.soudian.ui
 * @Description: TODO(添加描述)
 * @author Tal.Ben
 * @date 2015年5月30日 下午1:04:58
 * @version v1.0
 */
public class GiftLogActivity extends BaseActivity{

	@InjectView(R.id.tv_gift_log)
	TextView mTvGiftLog;
	
	private User mUser;
	
	@Override
    protected int getLayoutId() {
        return R.layout.activity_gift_log;
    }
    
    @Override
    protected boolean hasBackButton() {
        return true;
    }
    
    @Override
    protected int getActionBarTitle() {
        return R.string.user_giftLog;
    }
	
	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void initView() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void initData() {
		Intent intent = this.getIntent(); 
		mUser = (User)intent.getSerializableExtra(MyInformationFragment.MY_INFORMATION_USER);
		
		if (mUser != null && mUser.getuGiftLog() != null && !mUser.getuGiftLog().equals("")) {
			mTvGiftLog.setText(mUser.getuGiftLog());
		} else {
			mTvGiftLog.setText("没有获取任何积分。");
		}
	}

}

